package com.leorui.schoollife.filter

import java.io.File
import java.io.FilenameFilter

class PhotoFilter : FilenameFilter {
    private val jpg = ".jpg"
    private val png = ".png"
    private val jpeg = ".jpeg"
    override fun accept(dir: File?, name: String?): Boolean {
        return name?.endsWith(jpg) == true ||
                name?.endsWith(jpeg) == true ||
                name?.endsWith(png) == true
    }
}